package com.wlps.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.NumberFormat;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 客户表（client）(如果要删除的客户已经订购过商品，不能删除)
 * </p>
 *
 * @author ZWYZY
 * @since 2020-07-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value="client")
@ApiModel(value="Client对象", description="客户表（client）(如果要删除的客户已经订购过商品，不能删除)")
public class Client implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "客户编号")
    @TableId(value = "id", type = IdType.AUTO)
    private long id;

    @ApiModelProperty(value = "客户姓名")
    @NotNull
    private String name;

    @ApiModelProperty(value = "工作单位")
    @NotNull
    private String employer;

    @ApiModelProperty(value = "邮编")
    @TableField("emailNnumber")
    private String emailNnumber;

    @ApiModelProperty(value = "邮箱号码")
    @Email
    private String email;

    @ApiModelProperty(value = "联系地址")
    @NotNull
    private String address;

    @ApiModelProperty(value = "座机")
    @NotNull
    private String landline;

    @ApiModelProperty(value = "移动电话")
    @NotNull
    private String phone;
    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//数据库导出页面时json格式化
    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;
    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")//数据库导出页面时json格式化
    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;


}
